package com.twu.biblioteca.Command;

import java.io.PrintWriter;

import com.twu.biblioteca.Bibilioteca;

public class ShowMembershipDetailCommand implements IBibiliotecaCommand {
    private Bibilioteca bibilioteca;

    public ShowMembershipDetailCommand(Bibilioteca bibilioteca) {
        this.bibilioteca = bibilioteca;
    }

    public void ICommand(PrintWriter outputBuffer) {
        showMembershipDetail();
    }

    private void showMembershipDetail() {
        if (bibilioteca.isLogged())
            bibilioteca.getOutputBuffter().println(bibilioteca.getLoggedUser().getUserInfo());
        else
            bibilioteca.getOutputBuffter().println("Please talk to a Librarian. Thank you.");
    }
}